<!--
 * @Author: your name
 * @Date: 2020-05-31 10:04:29
 * @LastEditTime: 2021-04-05 22:20:45
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \react-demo\index.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>react学习</title>
    <!-- css -->
    <link rel="stylesheet" href="css/style.css"/>
    <!-- <Route path="*" component={NoMatch} /> -->
    <!-- 加载 React。-->
    <!-- 注意: 部署时，将 "development.js" 替换为 "production.min.js"。-->
    <script src="../../libs/js/react.production.min.js" crossorigin></script>
    <script src="../../libs/js/react-dom.production.min.js" crossorigin></script>
    <script src="../../libs/js/babel.min.js"></script>
    <!-- 加载我们的 React 组件。-->
    <!--redux-->
    <script src="../../libs/js/redux.min.js"></script>
    <script src="../../libs/js/react-redux.min.js"></script>
    <!-- react router -->
    <script src="../../libs/js/react-router-dom.min.js"></script>
    <script src="../../libs/js/axios.min.js"></script>
    <script src="../../libs/js/mock.js"></script>
    <!-- 自定义js -->
    <script src="mock/mock-home.js"></script>
    <script src="api/api.js"></script>
</head>

<body>
<div id="root"></div>

<!-- <script src="../libs/js/react-router.min.js"></script> -->
<!-- <script type="text/babel" src="./js/router.js"></script> -->
<script type="text/babel" src="js/component.js"></script>
<script type="text/babel">
    const {HashRouter, Router, Switch, Route, NavLink, Redirect, IndexRoute} = ReactRouterDOM;

    const {PureComponent} = React;

    class App extends PureComponent {
        render() {
            return(
                <div className="container"></div>
            )
        }
    }
    // <Redirect to={{
    //     pathname:"/home",
    //     search: "?utm=your+face",
    //     state: { referrer: currentLocation }
    // }}/>
    ReactDOM.render(
        <HashRouter>
            <switch>
                <Redirect from="/" to="/dashboard" />
                <Route path="/dashboard" render={ ()=>{ return ( <Dashboard/> )}}></Route>
                <Route path="/login" component={LoginPage}/>
            </switch>
        </HashRouter>, document.getElementById("root"));
</script>
</body>
</html>

